Integrand size = 34, antiderivative size = 119 \[ \int \frac {\tan (c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^{3/2}} \, dx=-\frac {(A-i B) \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{2 \sqrt {2} a^{3/2} d}-\frac {A+i B}{3 d (a+i a \tan (c+d x))^{3/2}}+\frac {A+3 i B}{2 a d \sqrt {a+i a \tan (c+d x)}} \]
-1/4*(A-I*B)*arctanh(1/2*(a+I*a*tan(d*x+c))^(1/2)*2^(1/2)/a^(1/2))/a^(3/2) /d*2^(1/2)+1/2*(A+3*I*B)/a/d/(a+I*a*tan(d*x+c))^(1/2)+1/3*(-A-I*B)/d/(a+I* a*tan(d*x+c))^(3/2)
Time = 1.37 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.99 \[ \int \frac {\tan (c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^{3/2}} \, dx=\frac {i \left (\frac {3 \sqrt {2} (i A+B) \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {a}}+\frac {4 a (i A-B)}{(a+i a \tan (c+d x))^{3/2}}-\frac {6 (i A-3 B)}{\sqrt {a+i a \tan (c+d x)}}\right )}{12 a d} \]
((I/12)*((3*Sqrt[2]*(I*A + B)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]* Sqrt[a])])/Sqrt[a] + (4*a*(I*A - B))/(a + I*a*Tan[c + d*x])^(3/2) - (6*(I* A - 3*B))/Sqrt[a + I*a*Tan[c + d*x]]))/(a*d)
Time = 0.52 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.06, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.206, Rules used = {3042, 4073, 3042, 4009, 3042, 3961, 219}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\tan (c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^{3/2}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan (c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^{3/2}}dx\) |
\(\Big \downarrow \) 4073 |
\(\displaystyle -\frac {i \int \frac {a (A+i B)+2 a B \tan (c+d x)}{\sqrt {i \tan (c+d x) a+a}}dx}{2 a^2}-\frac {A+i B}{3 d (a+i a \tan (c+d x))^{3/2}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {i \int \frac {a (A+i B)+2 a B \tan (c+d x)}{\sqrt {i \tan (c+d x) a+a}}dx}{2 a^2}-\frac {A+i B}{3 d (a+i a \tan (c+d x))^{3/2}}\) |
\(\Big \downarrow \) 4009 |
\(\displaystyle -\frac {i \left (\frac {1}{2} (A-i B) \int \sqrt {i \tan (c+d x) a+a}dx+\frac {a (-3 B+i A)}{d \sqrt {a+i a \tan (c+d x)}}\right )}{2 a^2}-\frac {A+i B}{3 d (a+i a \tan (c+d x))^{3/2}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {i \left (\frac {1}{2} (A-i B) \int \sqrt {i \tan (c+d x) a+a}dx+\frac {a (-3 B+i A)}{d \sqrt {a+i a \tan (c+d x)}}\right )}{2 a^2}-\frac {A+i B}{3 d (a+i a \tan (c+d x))^{3/2}}\) |
\(\Big \downarrow \) 3961 |
\(\displaystyle -\frac {i \left (\frac {a (-3 B+i A)}{d \sqrt {a+i a \tan (c+d x)}}-\frac {i a (A-i B) \int \frac {1}{a-i a \tan (c+d x)}d\sqrt {i \tan (c+d x) a+a}}{d}\right )}{2 a^2}-\frac {A+i B}{3 d (a+i a \tan (c+d x))^{3/2}}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\frac {i \left (\frac {a (-3 B+i A)}{d \sqrt {a+i a \tan (c+d x)}}-\frac {i \sqrt {a} (A-i B) \text {arctanh}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {2} d}\right )}{2 a^2}-\frac {A+i B}{3 d (a+i a \tan (c+d x))^{3/2}}\) |
-1/3*(A + I*B)/(d*(a + I*a*Tan[c + d*x])^(3/2)) - ((I/2)*(((-I)*Sqrt[a]*(A - I*B)*ArcTanh[Sqrt[a + I*a*Tan[c + d*x]]/(Sqrt[2]*Sqrt[a])])/(Sqrt[2]*d) + (a*(I*A - 3*B))/(d*Sqrt[a + I*a*Tan[c + d*x]])))/a^2
3.1.99.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[Sqrt[(a_) + (b_.)*tan[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[-2*(b/d) Subst[Int[1/(2*a - x^2), x], x, Sqrt[a + b*Tan[c + d*x]]], x] /; FreeQ[{a , b, c, d}, x] && EqQ[a^2 + b^2, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-(b*c - a*d))*((a + b*Tan[e + f*x])^m/(2*a *f*m)), x] + Simp[(b*c + a*d)/(2*a*b) Int[(a + b*Tan[e + f*x])^(m + 1), x ], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2 , 0] && LtQ[m, 0]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-( A*b - a*B))*(a*c + b*d)*((a + b*Tan[e + f*x])^m/(2*a^2*f*m)), x] + Simp[1/( 2*a*b) Int[(a + b*Tan[e + f*x])^(m + 1)*Simp[A*b*c + a*B*c + a*A*d + b*B* d + 2*a*B*d*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && LtQ[m, -1] && EqQ[a^2 + b^2, 0]
Time = 0.12 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.81
method | result | size |
derivativedivides | \(\frac {-\frac {2 \left (-\frac {A}{4}-\frac {3 i B}{4}\right )}{\sqrt {a +i a \tan \left (d x +c \right )}}-\frac {a \left (i B +A \right )}{3 \left (a +i a \tan \left (d x +c \right )\right )^{\frac {3}{2}}}-\frac {\left (\frac {A}{4}-\frac {i B}{4}\right ) \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{\sqrt {a}}}{a d}\) | \(96\) |
default | \(\frac {-\frac {2 \left (-\frac {A}{4}-\frac {3 i B}{4}\right )}{\sqrt {a +i a \tan \left (d x +c \right )}}-\frac {a \left (i B +A \right )}{3 \left (a +i a \tan \left (d x +c \right )\right )^{\frac {3}{2}}}-\frac {\left (\frac {A}{4}-\frac {i B}{4}\right ) \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{\sqrt {a}}}{a d}\) | \(96\) |
parts | \(\frac {A \left (-\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{4 a^{\frac {3}{2}}}-\frac {1}{3 \left (a +i a \tan \left (d x +c \right )\right )^{\frac {3}{2}}}+\frac {1}{2 a \sqrt {a +i a \tan \left (d x +c \right )}}\right )}{d}+\frac {2 i B \left (\frac {\sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{8 \sqrt {a}}+\frac {3}{4 \sqrt {a +i a \tan \left (d x +c \right )}}-\frac {a}{6 \left (a +i a \tan \left (d x +c \right )\right )^{\frac {3}{2}}}\right )}{d a}\) | \(149\) |
2/d/a*(-(-1/4*A-3/4*I*B)/(a+I*a*tan(d*x+c))^(1/2)-1/6*a*(A+I*B)/(a+I*a*tan (d*x+c))^(3/2)-1/2*(1/4*A-1/4*I*B)*2^(1/2)/a^(1/2)*arctanh(1/2*(a+I*a*tan( d*x+c))^(1/2)*2^(1/2)/a^(1/2)))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 369 vs. \(2 (88) = 176\).
Time = 0.25 (sec) , antiderivative size = 369, normalized size of antiderivative = 3.10 \[ \int \frac {\tan (c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^{3/2}} \, dx=\frac {{\left (3 \, \sqrt {\frac {1}{2}} a^{2} d \sqrt {\frac {A^{2} - 2 i \, A B - B^{2}}{a^{3} d^{2}}} e^{\left (3 i \, d x + 3 i \, c\right )} \log \left (-\frac {4 \, {\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (i \, a^{2} d e^{\left (2 i \, d x + 2 i \, c\right )} + i \, a^{2} d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {A^{2} - 2 i \, A B - B^{2}}{a^{3} d^{2}}} + {\left (-i \, A - B\right )} a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{i \, A + B}\right ) - 3 \, \sqrt {\frac {1}{2}} a^{2} d \sqrt {\frac {A^{2} - 2 i \, A B - B^{2}}{a^{3} d^{2}}} e^{\left (3 i \, d x + 3 i \, c\right )} \log \left (-\frac {4 \, {\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (-i \, a^{2} d e^{\left (2 i \, d x + 2 i \, c\right )} - i \, a^{2} d\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {A^{2} - 2 i \, A B - B^{2}}{a^{3} d^{2}}} + {\left (-i \, A - B\right )} a e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{i \, A + B}\right ) + \sqrt {2} {\left (2 \, {\left (A + 4 i \, B\right )} e^{\left (4 i \, d x + 4 i \, c\right )} + {\left (A + 7 i \, B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} - A - i \, B\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-3 i \, d x - 3 i \, c\right )}}{12 \, a^{2} d} \]
1/12*(3*sqrt(1/2)*a^2*d*sqrt((A^2 - 2*I*A*B - B^2)/(a^3*d^2))*e^(3*I*d*x + 3*I*c)*log(-4*(sqrt(2)*sqrt(1/2)*(I*a^2*d*e^(2*I*d*x + 2*I*c) + I*a^2*d)* sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt((A^2 - 2*I*A*B - B^2)/(a^3*d^2)) + (-I*A - B)*a*e^(I*d*x + I*c))*e^(-I*d*x - I*c)/(I*A + B)) - 3*sqrt(1/2)*a^ 2*d*sqrt((A^2 - 2*I*A*B - B^2)/(a^3*d^2))*e^(3*I*d*x + 3*I*c)*log(-4*(sqrt (2)*sqrt(1/2)*(-I*a^2*d*e^(2*I*d*x + 2*I*c) - I*a^2*d)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt((A^2 - 2*I*A*B - B^2)/(a^3*d^2)) + (-I*A - B)*a*e^(I*d *x + I*c))*e^(-I*d*x - I*c)/(I*A + B)) + sqrt(2)*(2*(A + 4*I*B)*e^(4*I*d*x + 4*I*c) + (A + 7*I*B)*e^(2*I*d*x + 2*I*c) - A - I*B)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1)))*e^(-3*I*d*x - 3*I*c)/(a^2*d)
\[ \int \frac {\tan (c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^{3/2}} \, dx=\int \frac {\left (A + B \tan {\left (c + d x \right )}\right ) \tan {\left (c + d x \right )}}{\left (i a \left (\tan {\left (c + d x \right )} - i\right )\right )^{\frac {3}{2}}}\, dx \]
Time = 0.37 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.97 \[ \int \frac {\tan (c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^{3/2}} \, dx=\frac {3 \, \sqrt {2} {\left (A - i \, B\right )} \sqrt {a} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) + \frac {4 \, {\left (3 \, {\left (i \, a \tan \left (d x + c\right ) + a\right )} {\left (A + 3 i \, B\right )} a - 2 \, {\left (A + i \, B\right )} a^{2}\right )}}{{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {3}{2}}}}{24 \, a^{2} d} \]
1/24*(3*sqrt(2)*(A - I*B)*sqrt(a)*log(-(sqrt(2)*sqrt(a) - sqrt(I*a*tan(d*x + c) + a))/(sqrt(2)*sqrt(a) + sqrt(I*a*tan(d*x + c) + a))) + 4*(3*(I*a*ta n(d*x + c) + a)*(A + 3*I*B)*a - 2*(A + I*B)*a^2)/(I*a*tan(d*x + c) + a)^(3 /2))/(a^2*d)
\[ \int \frac {\tan (c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^{3/2}} \, dx=\int { \frac {{\left (B \tan \left (d x + c\right ) + A\right )} \tan \left (d x + c\right )}{{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac {3}{2}}} \,d x } \]
Time = 8.11 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.37 \[ \int \frac {\tan (c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^{3/2}} \, dx=-\frac {\frac {B\,1{}\mathrm {i}}{3\,d}-\frac {B\,\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )\,3{}\mathrm {i}}{2\,a\,d}}{{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{3/2}}-\frac {\frac {A}{3}-\frac {A\,\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}{2\,a}}{d\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{3/2}}+\frac {\sqrt {2}\,B\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {-a}}\right )\,1{}\mathrm {i}}{4\,{\left (-a\right )}^{3/2}\,d}-\frac {\sqrt {2}\,A\,\mathrm {atanh}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {a}}\right )}{4\,a^{3/2}\,d} \]
(2^(1/2)*B*atan((2^(1/2)*(a + a*tan(c + d*x)*1i)^(1/2))/(2*(-a)^(1/2)))*1i )/(4*(-a)^(3/2)*d) - (A/3 - (A*(a + a*tan(c + d*x)*1i))/(2*a))/(d*(a + a*t an(c + d*x)*1i)^(3/2)) - ((B*1i)/(3*d) - (B*(a + a*tan(c + d*x)*1i)*3i)/(2 *a*d))/(a + a*tan(c + d*x)*1i)^(3/2) - (2^(1/2)*A*atanh((2^(1/2)*(a + a*ta n(c + d*x)*1i)^(1/2))/(2*a^(1/2))))/(4*a^(3/2)*d)